module(
    name = "with_cfg.bzl",
    version = "0.10.3",
    compatibility_level = 1,
)

bazel_dep(name = "bazel_features", version = "1.24.0")
bazel_dep(name = "bazel_skylib", version = "1.4.1")
bazel_dep(name = "platforms", version = "0.0.6")
bazel_dep(name = "rules_cc", version = "0.0.17")
bazel_dep(name = "rules_java", version = "8.6.0")

bazel_dep(name = "aspect_bazel_lib", version = "1.34.0", dev_dependency = True)
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.4.1", dev_dependency = True)
bazel_dep(name = "buildifier_prebuilt", version = "8.0.3", dev_dependency = True)
bazel_dep(name = "gazelle", version = "0.33.0", dev_dependency = True, repo_name = "bazel_gazelle")
bazel_dep(name = "rules_testing", version = "0.4.0", dev_dependency = True)
bazel_dep(name = "rules_proto", version = "6.0.0", dev_dependency = True)
bazel_dep(name = "stardoc", version = "0.7.2", dev_dependency = True)
bazel_dep(name = "toolchains_protoc", version = "0.3.6", dev_dependency = True)

protoc = use_extension(
    "@toolchains_protoc//protoc:extensions.bzl",
    "protoc",
    dev_dependency = True,
)
protoc.toolchain(
    # Creates a repository to satisfy well-known-types dependencies such as
    # deps=["@com_google_protobuf//:any_proto"]
    google_protobuf = "com_google_protobuf",
    # Pin to any version of protoc
    version = "v26.0",
)

protobuf_java_repos = use_extension(
    "//tools:extensions.bzl",
    "protobuf_java_repo",
    dev_dependency = True,
)
use_repo(protobuf_java_repos, "protobuf_java")

register_toolchains(
    "//docs/...",
    dev_dependency = True,
)
